import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import pinia from './stores'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import 'uno.css'
import { setupGlobalComponents, AnyMessageBox } from './components'

// 引入 vConsole
import VConsole from 'vconsole'

// 创建 vConsole 实例
const vConsole = new VConsole({
  theme: 'dark', // 设置主题为暗色
  defaultPlugins: ['system', 'network', 'element', 'storage'], // 默认显示的插件
  maxLogNumber: 1000, // 最大日志数量
  onReady: function() {
    console.log('vConsole is ready.')
  }
})

const app = createApp(App)

app.use(pinia)
app.use(router)
app.use(Antd)

// 注册全局组件
setupGlobalComponents(app)

// 添加全局属性
app.config.globalProperties.$AnyMessageBox = AnyMessageBox

app.mount('#app')
